<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ include file="/jsp/common/common.jsp"%>


<!doctype html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/static/jquery-easyui/themes/default/easyui.css"/>">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/static/jquery-easyui/themes/icon.css"/>">
<link rel="Stylesheet" type="text/css"
	href="<c:url value="/static/css/jquery.ui.css"/>" />
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/jquery-1.6.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/jquery.easyui.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/plugins/jquery.panel.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/plugins/jquery.datagrid.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/plugins/jquery.messager.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/ext-for-framework.js.jsp"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/locale/easyui-lang-zh_CN.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/js/common.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/js/Loading.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/js/showMsg.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/listBox/jquery.clever.listbox.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/jsp/matermanage/materUnit/addMaterUnit.js"/>"></script>
<script>
	var dataLeft;
	function initList(listDisplayEId) {
		$('#' + listDisplayEId).datagrid(
				{
					nowrap : false,
					striped : true,
					collapsible : true,
					remoteSort : true,
					notSelectByRow : false,
					url : '<c:url value='/materUnit/lookMaterUnit.do'/>'
							+ "?hostMaterId=${materId }",
					onLoadError : function() {
						$.messager.alert('错误', '获取数据失败，请与管理员联系！', 'error');
					}

				});
	};
	$(document).ready(function() {
		initList('listDisplay');
	});
</script>
</head>

<body>
	<table width="90%" align="center">
		<tr></tr>
		<tr>
			<td>

				<div style="height: auto; background: #fafafa; padding: 5px;"
					class="easyui-panel" title="添加材料单位关联信息" iconCls="icon-save"
					collapsible="true" minimizable="false" maximizable="false"
					closable="false">

					<form id="AddFoodForm" name="AddFoodForm" method="post"
						enctype="multipart/form-data" action="userlist.txt"
						onsubmit="return searchDGData(this.id,'listDisplay');">
						<table cellpadding="5">

							<tr>
								<td>主材料
								<td>
								<td><input class="easyui-validatebox" width="500px"
									readOnly="true" name="materString" id="materString"
									value='${materName }' /></td>

							</tr>

						</table>
						<table cellpadding="5" width="90%">
							<tr>
								<td>
									<table id="listDisplay" title="材料列表" iconCls="icon-list"
										singleSelect="true" idField="materId" loadMsg="请稍候......"
										pagination="false" rownumbers="true">
										<thead>
											<tr>
												<th field="materRole" width="25" align="center"
													checkbox="true"></th>
												<th field="materId" width="50" sortable="true">材料ID</th>
												<th field="materName" width="140" sortable="true">材料名</th>
												<th field="materType" width="80" formatter="formatFoodType1"
													sortable="true" editor="text">种类</th>
												<th field="unit" width="50" sortable="true" editor="text">单位</th>
												<th field="brands" width="70" sortable="true" editor="text">品牌</th>
												<th field="specifications" width="70" sortable="true"
													editor="text">规格</th>
											</tr>
										</thead>
									</table>
								</td>
							</tr>
						</table>
					</form>
				</div>
			</td>
		</tr>
	</table>

</body>
</html>